export interface EnvironmentConfig {
  baseUrl: string;
  version: string;
  apiPath: string;
  staticUrl: string;
}

const isDevelopment = process.env.NODE_ENV === 'development';

const baseUrl: string = isDevelopment ? import.meta.env.OPENSHOP_DEV_BASE_URL || '' : import.meta.env.OPENSHOP_BASE_URL || '';
const version: string = import.meta.env.OPENSHOP_VERSION || '';
const apiPath: string = import.meta.env.OPENSHOP_API_PATH || '';
const staticUrl: string = import.meta.env.OPENSHOP_STATIC_URL || '';

console.log(`[OpenShop ${version}]`);

export {
  baseUrl,
  version,
  apiPath,
  staticUrl,
};
